<template>
	<view class="box">
		<view class="context">
			<view class="rejectContext">
				<text>请填写驳回原因：</text>
				<textarea v-model="val"></textarea>
			</view>
			<view class="confirm" @click="confirm">
				<text>确认</text>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		onLoad(options) {
			this.id = options.id;
			console.log(this.id);
		},
		data() {
			return {
				id: null,
				val: null,
			};
		},
		methods: {
			jumpDetails4() {
				wx.navigateBack({
					delta: 1
				});
			},
			confirm() {
				let datas = {
					id: this.id,
					status: 2,
					content: this.val
				};
				console.log(`===============`)
				console.log(datas);
				console.log(`===============`)
				
				uni.request({
					url: "https://chat.assessgeek.com/api/Mianpage/getCheck",
					method: "POST",
					data: datas,
					success: (res) => {
						console.log(res);
						uni.navigateTo({
							url: "../doctorManagement1/doctorManagement1"
						})
					}
				});
			},
		}
	}
</script>

<style lang="scss">
	.context {
		@include outSideBox;
		background-color: RGBA(219, 244, 255, 1);

		.rejectContext {
			width: calc(100vw - 100rpx);
			margin: 10rpx auto;

			>textarea {
				border: 2rpx solid RGBA(153, 153, 153, 1);
				margin-top: 30rpx;
				width: 100%;
			}

			.texts {
				position: relative;

				&::before {
					content: "100字以内";
					color: red;
					position: absolute;
					right: 20rpx;
					bottom: 20rpx;
				}
			}
		}
	}

	.confirm {
		@include dibuanniu;
		width: 650rpx;
		bottom: 70rpx;
	}
</style>
